package com.yupi.usercenter.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.usercenter.common.BaseResponse;
import com.yupi.usercenter.model.domain.User;
import org.springframework.http.HttpRequest;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author 31913
* @description 针对表【user(用户)】的数据库操作Service
* @createDate 2024-05-12 22:40:03
*/
public interface UserService extends IService<User> {
    //注册
    long userRegister(String userAccount, String userPassword, String checkPassword, String planetCode);
     //登录
     User userLogin(String userAccount, String userPassword, HttpServletRequest request);

     //查询
    List<User> searchUserByName(String username);

    //退出
    int userLogout(HttpServletRequest request);
}


//注册思路
//1.接受前端账号密码 确认密码
//2后端进行校验  比如账户是否为空 密码是否为空 确认密码是否为空 密码和确认密码是否一致 账户是否重复 账户长度是否符合要求 密码长度是否符合要求

//登录思路
//1.前端接收账号密码
//2.后端进行校验
//3.查询数据库
//4.校验密码
//5.返回用户信息

